#include "mycoin.h"
#include <QDebug>


MyCoin::MyCoin(QString img)
{
    QPixmap pix;
    bool ret=pix.load(img);
    if(!ret)
    {
        QString str=QString("图片加载失败，失败路径为%1！").arg(img);
        qDebug()<<str;
        return;
    }
    //设置金币固定尺寸
    this->setFixedSize(pix.width(),pix.height());
    //设置不规则样式
    this->setStyleSheet("QPushButton{border:0px;}");
    //设置图标
    this->setIcon(pix);
    //设置图标大小
    this->setIconSize(QSize(pix.width(),pix.height()));
}
